// 工具
export const Tools = [
  {
    id: "1",
    name: "进水", // inflow
    children: [
      {
        name: "进水",
        image: "/nodes/1.png",
        data: {
          text: "进水",
          image: "/nodes/1.png",
          rect: {
            width: 100,
            height: 100,
          },
          name: "image",
          physicalFormList: [
            //
            { prop: "flow", label: "流量", unit: "m3/h", required: false },
            { prop: "COD", label: "COD", unit: "mg/L", required: false },
            { prop: "BOD", label: "BOD", unit: "mg/L", required: false },
            { prop: "NH3", label: "氨氮", unit: "mg/L", required: false }, // 氨氮 - NH3
            { prop: "TN", label: "总氮", unit: "mg/L", required: false }, // 总氮 - TN
            { prop: "TP", label: "总磷", unit: "mg/L", required: false }, // 总磷 - TP
            { prop: "SS", label: "SS", unit: "mg/L", required: false },
          ],
          physicalFormData: {},
          runFormList: [
            {
              prop: "series", // series
              label: "进水系列数",
              unit: "组",
              required: false,
            },
          ],
          runFormData: {},
          calibrationFormList: [],
          calibrationFormData: {},
        },
      },
      {
        name: "初沉池",
        image: "/nodes/2.png",
        data: {
          text: "初沉池",
          image: "/nodes/2.png",
          rect: {
            width: 100,
            height: 100,
          },
          name: "image",
          physicalFormList: [
            { prop: "diameter", label: "直径", unit: "m", required: false }, // 直径 - diameter
            { prop: "height", label: "有效池深", unit: "m", required: false }, // 深度 -height
          ],
          physicalFormData: {},
          runFormList: [],
          runFormData: {},
          calibrationFormList: [],
          calibrationFormData: {},
        },
      },
      {
        name: "厌氧池",
        image: "/nodes/3.png",
        data: {
          text: "厌氧池",
          image: "/nodes/3.png",
          rect: {
            width: 100,
            height: 100,
          },
          name: "image",
          physicalFormList: [
            { prop: "length", label: "长度", unit: "m", required: false }, // 长度 - length
            { prop: "width", label: "宽度", unit: "m", required: false }, // 宽度 -width
            { prop: "height", label: "高度", unit: "m", required: false }, // 高度 - height
          ],
          physicalFormData: {},
          runFormList: [
            {
              prop: "ORP",
              label: "ORP",
              unit: "mV",
              required: false,
            },
          ],
          runFormData: {},
          calibrationFormList: [
            {
              prop: "k1",
              label: "k1(SVI调整系数)",
              unit: "1.0-1.4",
              required: false,
            },
            {
              prop: "k2",
              label: "k2(厌氧池释磷系数)",
              unit: " 0-0.8",
              required: false,
            },
          ],
          calibrationFormData: {},
        },
      },
      {
        name: "缺氧池",
        image: "/nodes/4.png",
        data: {
          text: "缺氧池",
          image: "/nodes/4.png",
          rect: {
            width: 100,
            height: 100,
          },
          name: "image",
          physicalFormList: [
            { prop: "length", label: "长度", unit: "m", required: false }, // 长度 - length
            { prop: "width", label: "宽度", unit: "m", required: false }, // 宽度 -width
            { prop: "height", label: "高度", unit: "m", required: false }, // 高度 - height
          ],
          physicalFormData: {},
          runFormList: [
            {
              prop: "NO3", //硝氮 NO3
              label: "硝氮",
              unit: "mg/L",
              required: false,
            },
          ],
          runFormData: {},
        },
      },
      {
        name: "好氧池",
        image: "/nodes/5.png",
        data: {
          text: "好氧池",
          image: "/nodes/5.png",
          rect: {
            width: 100,
            height: 100,
          },
          name: "image",
          physicalFormList: [
            { prop: "length", label: "长度", unit: "m", required: false }, // 长度 - length
            { prop: "width", label: "宽度", unit: "m", required: false }, // 宽度 -width
            { prop: "height", label: "高度", unit: "m", required: false }, // 高度 - height
          ],
          physicalFormData: {},
          runFormList: [
            {
              prop: "internal_reflux", // internal_reflux
              label: "内回流比",
              unit: "%",
              required: false,
            },
            {
              prop: "MLSS", // MLSS
              label: "污泥浓度",
              unit: "mg/L",
              required: false,
            },
            {
              prop: "PO4", //PO4
              label: "正磷酸盐浓度",
              unit: "mg/L",
              required: false,
            },
            {
              prop: "DO", //DO
              label: "溶解氧浓度",
              unit: "mg/L",
              required: false,
            },
          ],
          runFormData: {},
          calibrationFormList: [
            {
              prop: "k3",
              label: "k3(COD校准系数)",
              unit: "0.5-1.5",
              required: false,
            },
            {
              prop: "k4",
              label: "k4(氨氮校准系数)",
              unit: "0-0.8",
              required: false,
            },
            {
              prop: "k5",
              label: "k5(硝酸盐氮校准系数)",
              unit: "0.5-1.5",
              required: false,
            },
            {
              prop: "koc",
              label: "koc(COD降解溶解氧平衡常数)",
              unit: "0.3-0.6",
              required: false,
            },
            {
              prop: "koa",
              label: "koa(氨氮降解溶解氧平衡常数)",
              unit: "0.5-0.7",
              required: false,
            },
          ],
          calibrationFormData: {},
        },
      },
      {
        name: "二沉池",
        image: "/nodes/6.png",
        data: {
          text: "二沉池",
          image: "/nodes/6.png",
          rect: {
            width: 100,
            height: 100,
          },
          name: "image",
          physicalFormList: [
            { prop: "diameter", label: "直径", unit: "m", required: false },
            { prop: "height", label: "有效池深", unit: "m", required: false },
          ],
          physicalFormData: {},
          runFormList: [
            {
              prop: "external_reflux", // external_reflux
              label: "外回流比",
              unit: "%",
              required: false,
            },
            {
              prop: "discharge_sludge", // discharge_sludge
              label: "排泥量",
              unit: "m3",
              required: false,
            },
          ],
          runFormData: {},
        },
      },
      {
        name: "滤池",
        image: "/nodes/7.png",
        data: {
          text: "滤池",
          image: "/nodes/7.png",
          rect: {
            width: 100,
            height: 100,
          },
          name: "image",
        },
      },
    ],
  },
];
export function createRandomId() {
  return (
    (Math.random() * 10000000).toString(16).substr(0, 4) +
    "-" +
    new Date().getTime() +
    "-" +
    Math.random().toString().substr(2, 5)
  );
}
